package com.qf.business.user.feign;

import com.qf.commons.base.result.R;
import com.qf.data.user.entity.ScoreDesc;
import com.qf.data.user.entity.Student;
import com.qf.data.user.vo.input.StuLoginVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * author Ken
 * create_time 2022/12/2
 */
@FeignClient(value = "user-server", contextId = "student")
@RequestMapping("/user/stu")
public interface StuFeign {

    @RequestMapping("/queryByOpenId")
    R<Student> queryStu(@RequestBody StuLoginVo loginVo);

    @RequestMapping("/querySocre")
    R<Integer> querySocre();

    @RequestMapping("/updateScore")
    R updateUserScore(@RequestParam("score") Integer score, @RequestParam("action") Integer action);

    @RequestMapping("/updateScoreByUid")
    R updateUserScore(@RequestParam("score") Integer score, @RequestParam("uid") Long uid, @RequestParam("action") Integer action);

    @RequestMapping("/insertScoreDesc")
    R insertScoreDesc(@RequestBody ScoreDesc scoreDesc);
}
